
import { fetch } from "@/src/utils/interceptos.js"

const obj = {
	headerGET : {
		"Content-type":'application/x-www-from-urlencoded'
	},
	headerPost : {
    "Content-type": "application/json"
  }	
}



// GET 请求
export const reqGet = (url,params={}) => {
	let tempParms = {}
	tempParms.data = params
	tempParms.method = 'GET',
	tempParms.header = obj.headerGET
  return fetch(url,tempParms)
}

// POST 请求
export const reqPost = (url,params={}) => {
	let tempParms = {}
	tempParms.data = params
	tempParms.method = 'POST',
	tempParms.header = obj.headerPost
  return fetch(url,tempParms)
}